import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '检查结果',
    align:"center",
    dataIndex: 'result'
   },
   {
    title: ' 检查人',
    align:"center",
    dataIndex: 'inspectionPersonnel'
   },
   {
    title: '问题描述',
    align:"center",
    dataIndex: 'problemDescription'
   },
   {
    title: ' 整改期限',
    align:"center",
    dataIndex: 'rectificationDeadline'
   },
   {
    title: '整改人',
    align:"center",
    dataIndex: 'rectifierPerson'
   },
   {
    title: '复查人',
    align:"center",
    dataIndex: 'reviewerPerson'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "检查结果",
      field: "result",
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: " 检查人",
      field: "inspectionPersonnel",
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "问题描述",
      field: "problemDescription",
      component: 'Input',
      //colProps: {span: 6},
 	},
     {
      label: " 整改期限",
      field: "rectificationDeadline",
      component: 'RangePicker',
      componentProps: {
          showTime:true
      },
      //colProps: {span: 6},
	},
	{
      label: "复查状态",
      field: "reviewerStatus",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"zy_review_status"
      },
      //colProps: {span: 6},
 	},
	{
      label: "整改状态",
      field: "rectifierStatus",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"zy_rectifier_status"
      },
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '检查结果',
    field: 'result',
    component: 'Input',
  },
  {
    label: ' 检查人',
    field: 'inspectionPersonnel',
    component: 'Input',
  },
  {
    label: '问题描述',
    field: 'problemDescription',
    component: 'Input',
  },
  {
    label: ' 整改期限',
    field: 'rectificationDeadline',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '整改人',
    field: 'rectifierPerson',
    component: 'Input',
  },
  {
    label: '复查人',
    field: 'reviewerPerson',
    component: 'Input',
  },
  {
    label: '问题照片',
    field: 'problemPhoto',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: ' 结论',
    field: 'conclusion',
    component: 'Input',
  },
  {
    label: '复查状态',
    field: 'reviewerStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"zy_review_status"
     },
  },
  {
    label: '整改状态',
    field: 'rectifierStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"zy_rectifier_status"
     },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
//子表单数据
export const zyRectificationInformationFormSchema: FormSchema[] = [
  {
    label: '整改人员',
    field: 'rectificationPersonnel',
    component: 'Input',
  },
  {
    label: '整改完成时间',
    field: 'completionTime',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '整改详情',
    field: 'rectificationInfo',
    component: 'Input',
  },
  {
    label: '整改照片',
    field: 'rectificationPhoto',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '整改状态',
    field: 'status',
    component: 'Input',
  },
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
export const zyReviewInformationFormSchema: FormSchema[] = [
  {
    label: ' 复查人员',
    field: 'reviewPersonnel',
    component: 'Input',
  },
  {
    label: '复查时间',
    field: 'reviewTime',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '复查描述',
    field: 'reviewDesc',
    component: 'Input',
  },
  {
    label: '复查照片',
    field: 'reviewPhoto',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '复查状态',
    field: 'status',
    component: 'Input',
  },
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
//子表表格配置
